package com.woniuxy.sddfp.sms.controller;

import com.woniuxy.sddfp.sms.service.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yellow Docter
 * @date 2024-11-14
 * @desc 蜗牛创想：www.woniuxy.com
 */
@RestController
@RequestMapping("sms")
public class SmsController {

    @Autowired
    private SmsService smsService;

    @GetMapping("/{phone}")
    public String getCode(@PathVariable String phone) {
        String code = smsService.sendCode(phone);
        return code;
    }

}
